package me.yiyou.meihua.database

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import kotlinx.coroutines.flow.Flow
import me.yiyou.meihua.data.LunarDate
import me.yiyou.meihua.data.SaveBean

@Dao
interface MeiHuaDao {

    /**
     * 插入数据
     */
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(saveBean: SaveBean) : Long

    /**
     * 查询所有数据
     */
    @Query("select * from save")
    fun getAll(): Flow<List<SaveBean>>
}